<div class="row animate fadeIn">
    <form id="" class="form-horizontal"  method="post">
        <div class="ibox-title" style="border:none;"><h5 style="color: #00afef"><i>View Users</i></h5>

        </div>
        <?php foreach($users_data as $users) { ?>
        <div class="ibox-content">   
          <div class="form-group">
              <label class="col-lg-4 control-label">User Name</label>
            <div class="col-lg-5">
              <input type="text" name="" class="form-control" value="<?php echo $users->user_name ; ?>" disabled>
            </div>
          </div>
          <div class="form-group">
              <label class="col-lg-4 control-label">First Name</label>
            <div class="col-lg-5">
              <input type="text" name="" class="form-control" value="<?php echo $users->first_name ; ?>" disabled>
            </div>
          </div>
          <div class="form-group">
              <label class="col-lg-4 control-label">Last Name</label>
            <div class="col-lg-5">
              <input type="text" name="" class="form-control" value="<?php echo $users->last_name ; ?>" disabled>
            </div>
          </div>
          <div class="form-group">
              <label class="col-lg-4 control-label">Email</label>
            <div class="col-lg-5">
              <input type="text" name="" class="form-control" value="<?php echo $users->email; ?>" disabled>
            </div>
          </div>
          <div class="form-group">
              <label class="col-lg-4 control-label">Company</label>
            <div class="col-lg-5">
              <select  id="comp" class="form-control chosen-select" name="" disabled>
                <?php foreach ($company as $comp) { ?>
                  <option value="<?php echo $comp->company_id; ?>" <?php echo ($users->company_id == $comp->company_id ? 'selected' : '' ); ?> ><?php echo $comp->company_name; ?></option>
                <?php } ?>
              </select>
            </div>
          </div>
          <div class="form-group">
            <label class="col-lg-4 control-label">Department</label>
            <div class="col-lg-5">
              <select  id="" class="form-control chosen-select" disabled name="department">
                <option value="">--</option>
                <?php foreach ($department as $dep) { ?>
                  <option value="<?php echo $dep->lookup_code; ?>" <?php echo ($dep->lookup_code == $users->department ? 'selected' : ''); ?>><?php echo $dep->meaning; ?></option>
                <?php } ?>
              </select>
            </div>
          </div>
          <div class="form-group">
              <label class="col-lg-4 control-label">Enable</label>
            <div class="col-lg-5">
              <input type="checkbox" value="ok" name="" id="" class="i-checks" <?php echo ($users->enable_flag == "Y" ? 'checked' : ''); ?> disabled>
            </div>
          </div>
        </div>
        <?php } ?>
    </form>
<!--  -->
        <div id="role_access" class="ibox-content">
            <h3 style="color: #00afef">Role Access</h3>
            </br>
              <table id="pgTable"class="table table-bordered" style="width:70%;">
                
                <thead>
                    <tr>
                      <th style="">Role</th>
                      <th style="width:130px;text-align:right;">Start Date</th>
                      <th style="width:130px;text-align:right;">End Date</th>
                      <th style="width:50px;">Enable</th>
                    </tr>  
                </thead>
                <tbody  class="animate fadeIn">
                    <?php $cb_ena = "hover"; foreach($role_access as $role) {   if($role->enable_flag =="Y") $cb_ena = "checked"; ?>
                    <tr>
                      <td><?php echo $role->role_name; ?></td>
                      <td><?php echo $role->role_name; ?></td>
                      <td><?php echo $role->role_name; ?></td>
                      <td style="text-align:center;"><div style="cursor:default;" class="state icheckbox_square-green <?php echo $cb_ena; ?>"></div></td>
                    </tr>                             
                    <?php } ?>  
                </tbody>
              </table>
               
        </div>
</div>
<script>
$(document).ready(function () {$('#s-c').remove();
  $('select').trigger('chosen:updated');
    $(".chosen-select").chosen({width:"100%;"});
      $('.i-checks').iCheck({
          checkboxClass: 'icheckbox_square-green',
          radioClass: 'iradio_square-green',
      });


        $('#viewX').click(function(){
            close_view(); active_search();        
       });

});
</script>